let getDateTime = function() {
    let e = new Date
      , t = e.getMonth() + 1
      , r = e.getDate()
      , n = e.getFullYear()
      , a = e.getHours()
      , g = e.getMinutes()
      , u = e.getSeconds();
    return g < 10 && (g = "0" + g),
    u < 10 && (u = "0" + u),
    "Y-m-d H:i:s".replace("Y", n).replace("m", t).replace("d", r).replace("H", a).replace("i", g).replace("s", u)
}
  , getISODateTime = function(e) {
    function t(e) {
        return e < 10 ? "0" + e : e
    }
    return e.getUTCFullYear() + "-" + t(e.getUTCMonth() + 1) + "-" + t(e.getUTCDate()) + "T" + t(e.getUTCHours()) + ":" + t(e.getUTCMinutes()) + ":" + t(e.getUTCSeconds()) + "Z"
}
  , prettyDate = function(e) {
    let t, r = [[60, "刚刚"], [90, "1分钟"], [3600, "分钟", 60], [5400, "1小时"], [86400, "小时", 3600], [129600, "1天"], [604800, "天", 86400], [907200, "1周"], [2628e3, "周", 604800], [3942e3, "1月"], [31536e3, "月", 2628e3], [47304e3, "1年"], [31536e5, "年", 31536e3], [47304e5, "1世纪"]], n = ("" + e).replace(/-/g, "/").replace(/[TZ]/g, " "), a = (new Date - new Date(n)) / 1e3, g = "前", u = 0;
    for (a < 0 && (a = Math.abs(a),
    g = "后"); t = r[u++]; )
        if (a < t[0])
            return 2 === t.length ? t[1] + (u > 1 ? g : "") : Math.round(a / t[2]) + t[1] + (u > 1 ? g : "");
    return a > 47304e5 ? Math.round(a / 47304e5) + "世纪" + g : e
};
